﻿using EFCoreRepositoryDemo.Data;
using EFCoreRepositoryDemo.Entities;
using Microsoft.EntityFrameworkCore;

namespace EFCoreRepositoryDemo.Repositories
{
    public class ProductRepository : Repository<Product>, IProductRepository
    {
        public ProductRepository(AppDbContext context) : base(context)
        {

        }

        public async Task<List<Product>> GetProductsByPriceGreaterThanAsync(decimal price)
        {
            return await _dbSet.Where(p => p.Price > price).ToListAsync();
        }
    }
}
